/**
 * Created by yanxiaoyao on 17/03/03.
 */
'use strict';
(function(win) {
    /*
     * 文件依赖
     */
    var config = {
        paths: {
            'jquery': 'jquery-1.9.1.min',
            'jquery-migrate': 'jquery-migrate-1.2.1.min',
            'angular': 'angular',
            'ui-router': 'angular-ui-router.min',
            'angular-cookie': 'angular.cookie',
            'angular-toastr': 'angular-toastr.min',
            'angular-toastr-tpls': 'angular-toastr.tpls',
            'page': 'page',
            'app': 'app/app',
            'config': 'config',
            'common': 'commons',
            'popUp': 'popUp'
        },
        shim: {
            'angular': {
                exports: 'angular'
            },
            'ui-router': {
                deps: ['angular']
            },
            'angular-toastr': {
                deps: ['angular']
            },
            'angular-toastr-tpls': {
                deps: ['angular']
            },
            'page': {
                deps: ['angular']
            },
            'angular-cookie': {
                deps: ['angular']
            },
            'common': {
                deps: ['jquery']
            },
            'popUp': {
                deps: ['common']
            }
        }
    };
    require.config(config);
    require(['jquery', 'angular', 'config', 'app', 'common', 'popUp'], function($, angular) {
        angular.bootstrap(document, ['myApp']);
    });
})(window);
